package com.xy.novelweb.config;

import com.xy.novelweb.domain.Novel;
import com.xy.novelweb.filter.NovelFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {
		@Bean
		public FilterRegistrationBean registFilter() {
				FilterRegistrationBean registration = new FilterRegistrationBean();
				registration.setFilter(new NovelFilter());
				registration.addUrlPatterns("/novel/book/*");
				registration.setName("NovelFilter");
				registration.setOrder(1);
				return registration;
		}
}
